import {Http} from '@/utils/http.js';
class TheFun{
    constructor(page,funClassifyId,canRefresh) {
		this.page = page;
		this.funClassifyId = funClassifyId;
		this.canRefresh = canRefresh
    }
	static async getFunShare(param){
		return await Http.request({
			url: "topicOrFunClassify/getFunClassify/1",
			data: param,
			method: "GET",
			header: {
			      'content-type': 'application/x-www-form-urlencoded'
			}
		})
	}
	
	static async getFunList(param){
		return await Http.request({
			url: "funShare/findFunList",
			data: param,
			method: "POST",
			header: {
			      'content-type': 'application/x-www-form-urlencoded'
			}
		})
	}
	
	static async getFunClassifyList(param){
		return await Http.request({
			url: "topicOrFunClassify/getFunClassifyList",
		})
	}
	
	static async likeFun(param){
		return await Http.request({
			url: "funShare/shareClick",
			data: param,
			method: "POST",
			header: {
			      'content-type': 'application/x-www-form-urlencoded'
			}
		})
	}
	
	static async forwardFun(param){
		return await Http.request({
			url: "funShare/forward",
			data: param,
			method: "POST",
			header: {
			      'content-type': 'application/x-www-form-urlencoded'
			}
		})
	}
	
	static async getFunDetail(param){
		return await Http.request({
			url: "funShare/findFunShareDetail",
			data: param,
			method: "POST",
			header: {
			      'content-type': 'application/x-www-form-urlencoded'
			}
		})
	}
	
	static async addPlayNum(param){
		return await Http.request({
			url: "funShare/addPlayNum",
			data: param,
			method: "POST",
			header: {
			      'content-type': 'application/x-www-form-urlencoded'
			}
		})
	}
	
	static async getFriendFun(param){
		return await Http.request({
			url: "funShare/getFriendFun",
			data: param,
			method: "POST",
			header: {
			      'content-type': 'application/x-www-form-urlencoded'
			}
		})
	}
	
	static async searchFun(param){
		return await Http.request({
			url: "funShare/searchFun",
			data: param,
			method: "POST",
			header: {
			      'content-type': 'application/x-www-form-urlencoded'
			}
		})
	}
	
	static async addShare(param){
		return await Http.request({
			url: "funShare/addShare",
			data: param,
			method: "POST",
			header: {
			      'content-type': 'application/x-www-form-urlencoded'
			}
		})
	}
	
	static async getCommentList(param){
		return await Http.request({
			url: "funComment/findCommentList",
			data: param,
			method: "POST",
			header: {
			      'content-type': 'application/x-www-form-urlencoded'
			}
		})
	}

}

export {
    TheFun
}